From: Kim F. Storm Date: Wed, 12 Feb 2003 11:08:24 +0000 (+0000) Subject: (Fstart_kbd_macro): If appending, and last keyboard X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~28309 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=465952d76038fc6f5c2f9bc0e02690babe947633;p=emacs.git (Fstart_kbd_macro): If appending, and last keyboard macro is a string, convert meta modifiers in string when copying the string into a vector. --- diff --git a/src/macros.c b/src/macros.c index 44d44d2c9c1..2b50a491ca4 100644 --- a/src/macros.c +++ b/src/macros.c @@ -93,6 +93,7 @@ macro before appending to it. */) else { int i, len; + int cvt; /* Check the type of last-kbd-macro in case Lisp code changed it. */ if (!STRINGP (current_kboard->Vlast_kbd_macro) @@ -111,9 +112,17 @@ macro before appending to it. */) = (Lisp_Object *)xrealloc (current_kboard->kbd_macro_buffer, (len + 30) * sizeof (Lisp_Object)); } + + /* Must convert meta modifier when copying string to vector. */ + cvt = STRINGP (current_kboard->Vlast_kbd_macro); for (i = 0; i < len; i++) - current_kboard->kbd_macro_buffer[i] - = Faref (current_kboard->Vlast_kbd_macro, make_number (i)); + { + Lisp_Object c; + c = Faref (current_kboard->Vlast_kbd_macro, make_number (i)); + if (cvt && INTEGERP (c) && (XINT (c) & 0x80)) + c = XSETFASTINT (c, CHAR_META | (XINT (c) & ~0x80)); + current_kboard->kbd_macro_buffer[i] = c; + } current_kboard->kbd_macro_ptr = current_kboard->kbd_macro_buffer + len; current_kboard->kbd_macro_end = current_kboard->kbd_macro_ptr;